package com.diaohw.module.metadata.obj.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.diaohw.platform.framework.db.obj.BaseModel;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serial;

/**
 * <p>
 * 元数据分组关联关系表
 * </p>
 *
 * @author D-Hw
 * @since 2025-04-07
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("META_RELATIONSHIP")
@Schema(name = "MetaRelationshipDO", description = "元数据分组关联关系表")
public class MetaRelationshipDO extends BaseModel<MetaRelationshipDO> {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 分组ID
     */
    @Schema(description = "分组ID")
    @TableField("GROUP_ID")
    private String groupId;

    /**
     * 分组名称
     */
    @Schema(description = "分组名称")
    @TableField("GROUP_NAME")
    private String groupName;

    /**
     * 分组编码
     */
    @Schema(description = "分组编码")
    @TableField("GROUP_CODE")
    private String groupCode;

    /**
     * 元数据ID
     */
    @Schema(description = "元数据ID")
    @TableField("META_ID")
    private String metaId;

    /**
     * 元数据名称
     */
    @Schema(description = "元数据名称")
    @TableField("META_NAME")
    private String metaName;

    /**
     * 元数据编码
     */
    @Schema(description = "元数据编码")
    @TableField("META_CODE")
    private String metaCode;

    /**
     * 是否为多条记录
     */
    @Schema(description = "是否为多条记录")
    @TableField("MULTIPLE_")
    private Boolean multiple;

    public boolean isMultiple() {
        return Boolean.TRUE.equals(multiple);
    }

}
